
package org.onion.pattern.domain.annotation;

import java.lang.annotation.*;

/**
 * An association to an {@link AggregateRoot}.
 *
 * @see <a href="https://scabl.blogspot.com/2015/04/aeddd-9.html>John Sullivan - Advancing Enterprise DDD - Reinstating the Aggregate</a>
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@Documented
public @interface Association {

    /**
     * Defines the aggregate type.
     *
     * @return the of the aggregate.
     */
    Class<?> aggregateType() default void.class;
}
